package com.xh.audit.vo.webform;

import com.mybatisflex.core.query.QueryWrapper;
import com.xh.audit.entity.unituser.Auditee;
import lombok.Data;
import lombok.EqualsAndHashCode;

import static com.xh.audit.entity.unituser.table.AuditeeTableDef.AUDITEE;

@Data
@EqualsAndHashCode(callSuper = true)
public class AuditeeQuery extends PageParams<Auditee> {
    private Integer auditeeCode;
    private String auditeeName;

    public QueryWrapper queryWrapperBuild() {
        QueryWrapper queryWrapper = QueryWrapper.create()
                .and(AUDITEE.AUDITEE_CODE.eq(auditeeCode))
                .and(AUDITEE.AUDITEE_NAME.likeLeft(auditeeName));
        return queryWrapper;
    }
}
